﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ViewDocuments2.aspx.cs" Inherits="ViewDocuments2" %>

<%@ Register TagPrefix="tc" Namespace="TallComponents.Web.Pdf" Assembly="TallComponents.Web.PdfViewer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head id="Head1" runat="server">
    <title>PDF Library Demo - PDFWebViewer.NET</title>
    <style type="text/css">
        body
        {
            font-family: Verdana, Arial, Helvetica, _sans;
            font-size: 12px;
        }
        img
        {
            border: none;
        }
        .thumb
        {
            margin: 0px;
            padding: 0px;
        }
        .thumb img
        {
            border: solid 1px #999999;
            margin: 3px;
        }
        .thumb:hover img
        {
            border: solid 2px #66ff33;
            margin: 2px;
        }
        .active img
        {
            border: solid 2px black;
            margin: 2px;
        }
        a:active
        {
            outline: 0 none black;
        }
        #documents
        {
            border: 1px solid #999999;
            width: 180px;
            height: 754px;
            overflow: auto;
            font-size: 10px;
        }
        #documents ul
        {
            margin: 0px;
            padding: 0px;
        }
        #documents ul li
        {
            list-style: none outside;
            padding: 2px;
            margin: 3px;
            min-height: 32px;
        }
        #documents a
        {
            color: black;
            text-decoration: none;
            display: block;
            height: auto;
            width: auto;
        }
        #documents a:visited
        {
            color: black;
        }
        #documents li:hover
        {
            background-color: #eeeeee;
            color: Black;
        }
        #documents .info
        {
            font-size: 9px;
            color: #aaaaaa;
        }
        .selection
        {
            border: solid 1px red;
        }
        .searchBox
        {
            margin: 1px;
            border: none 0px;
            width: 100px;
        }
    </style>
</head>
<body>
    <form id="Form1" method="post" runat="server" enctype="multipart/form-data">
    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" />
    <table cellpadding="0" cellspacing="2" style="width: auto;">
        <tr>
            <td>
                <a href=Default.aspx>Back to the main page</a>
            </td>
        </tr>
        <tr>
            <td>
                <div id="documents">
                    <ul>
                        <% foreach (TallComponents.Web.Pdf.Document doc in TallComponents.Web.Storage.PdfStorage.Providers["documents2"].GetDocuments())
                           { %>
                        <li><a href="ViewDocuments2.aspx?doc=<%= doc.StorageKey %>">
                            <img alt="<%= doc.DocumentInfo.Title %>" src="img/pdf32.png" style="float: left" /><span
                                style="margin-left: 36px; display: block;"><%= doc.DocumentInfo.Title %><br />
                                <span class="info">
                                    <%= doc.FileName %><br />
                                    <%= string.Format( "{0} page{1}", doc.Pages.Count, doc.Pages.Count > 1 ? "s" : "" ) %></span></span></a>
                        </li>
                        <% } %>
                    </ul>
                </div>
            </td>
            <td valign="top" style="border: solid 1px #aaaaaa;">
                <tc:PdfViewerToolbar ID="Toolbar" runat="server" PdfViewerControlId="pdfViewer" ShowSearchBox="true" />
                <tc:PdfThumbnailsList ID="thumbnails" runat="server" PdfViewerControlId="pdfViewer"
                    Width="100%" Height="160" ServiceUrl="pageasimage.ashx" ThumbnailCssClass="thumb"
                    SelectedThumbnailCssClass="active" Orientation="Horizontal" StorageProviderName="documents2" />
                <tc:PdfViewer ID="pdfViewer" runat="server" Width="100%" Height="570" ZoomMode="FitToPage"
                    ServiceUrl="pageasimage.ashx" SearchServiceUrl="search.ashx" StorageProviderName="documents2" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
